package com.qingcheng.dao;

import com.qingcheng.pojo.system.AdminRole;
import com.qingcheng.pojo.system.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import javax.persistence.Id;
import java.util.List;

public interface AdminRoleMapper extends Mapper<AdminRole> {
    @Select("SELECT * FROM tb_role WHERE id IN(SELECT role_id FROM tb_admin_role ar WHERE ar.`admin_id`=#{id})")
    public List<Role> findListByAdminId(@Param("id") Integer id);

}
